<template>
	<view>
		<image class="image" :src="img"></image>
	</view>
</template>

<script>
	import Back from "@/components/back.vue"
	export default {
		components: {
			Back
		},
		data() {
			return {
				img: ""
			}
		},
		onLoad() {
			//转换this
			let _this = this 
			const eventChannel = this.getOpenerEventChannel()
			// 监听url事件，获取上一页面通过eventChannel传送到当前页面的数据
			eventChannel.on('url', function(data) {
				//console.log(data.data)
				_this.img = data.data
			})
		}
	}
</script>

<style lang="scss">
	.image {
		position: fixed;
		left: 50%;
		top: 50%;
		transform: translate(-50%, -50%);
	}
</style>
